#ifndef CAMERA_H
#define CAMERA_H

enum moves{MOVE_R, MOVE_L, MOVE_U, MOVE_D, ROTATE_R, ROTATE_L, ROTATE_U, ROTATE_D, INCZ, DECZ};
enum cam_view{PERSPECTIVE, ORTHO};

typedef short int CZoom;
typedef short int CMove;
typedef short int CRotate;

#include <QVector3D>

class Camera
{
public:
    Camera(const QVector3D &camera_position, double roll = 0.0, double yaw = 0.0, double pitch = 0.0);
    virtual ~Camera();
    void locate_camera();
    void rotate_camera(CRotate to, double dist);
    void move_camera(CMove to, double dist);
    void zoom(CZoom type, double zoom);
    inline void change_view(cam_view _view) {c_view = _view; locate_camera();}
    void reset();
private:
    void clamp_camera();
    void clamp_positive(double &value);
    void clamp_negative(double &value);
private:
    cam_view c_view; // the camera view projection
};

#endif // CAMERA_H
